home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
programming
/
other
/
gui4cli
/
docs
/
tutorials
/
textfile.gc
< prev
next >
Wrap
Text File
|
1999-05-14
|
2KB
|
48 lines
G4C
; ---------------------------------------------------------------
; This is an example of how to use the TEXTFILE command
; for supplying data for a listview, on the fly..
; ---------------------------------------------------------------
WINBIG -1 -1 362 61 TextFile.gc
WinType 11110001
xOnLoad
GuiOpen TextFile.gc
; We can delete the file once we have loaded the gui, since
; the listview has already read it's contents.
; Remember - this xOnLoad event is executed *after* the file
; has been loaded, whereas the TextFile command is executed
; *while* the file is being loaded.
Delete RAM:MyFile
xOnClose
GuiQuit TextFile.gc
; ---------------------------------------------------------------
; The TEXTFILE
; Note we declare it *before* we declare the listview, so
; that when Gui4Cli reaches the listview, the file is
; already created and ready.
; ---------------------------------------------------------------
TEXTFILE RAM:MyFile
This file was created on the fly, using the
TEXTFILE command, loaded into this listview
and then deleted relentlessly..
He who did it.
###
; ---------------------------------------------------------------
; This is the listview wich will dispaly the above file.
; When Gui4Cli reaches here, it will try to find the file
; and load it into the listview.
; ---------------------------------------------------------------
XLISTVIEW 0 0 360 60 "" var RAM:MyFile 0 TXT